#!/bin/bash

echo "Setting up Lotus project..."

# 确保子模块初始化
if [ ! -d "buildroot/.git" ]; then
    echo "Initializing Buildroot submodule..."
    git submodule update --init --recursive
fi

# 检查Buildroot版本
cd buildroot
BUILDROOT_VERSION=$(git describe --tags --abbrev=0)
echo "Buildroot version: $BUILDROOT_VERSION"

# 创建images目录如果不存在
cd ..
mkdir -p images

echo "Project setup complete!"
